
  #################################################################################################

  Instructions for replicating Supplemental Material for: "Measuring Foreign Policy Positions of Members of the US Congress", 
  Political Science Research and Methods. (forthcoming).

  ################################################################################################

  
  Note 1: All replications are done in R. You need "MCMCpack", "anominate", and "wnominate" packages in R. 

  Note 2: To replicate figures and tables in Supplemental Files, you need to run all the R codes whose title starts with "Supplemental_Figure_..." or "Supplemental_Table_...". 
  Also, you need to re-run Figure3_R_code.R. This code is updated to produce Figures 15 and 16 and the necessary output for Figure 6 in Supplemental Files.

  Note 3: "Figure3_R_code.R" (for the Senate data) and "Supplmental_Figure_10.R" (for the House data) involve MCMC simulations. My original settings of MCMC iterations were mcmc=100000 and thin=100 (Senate) and  mcmc=10000 and thin=5 (House).
  For quick results, I reduced the number of iterations in the replication codes. (Still, it will take a couple of days to complete the iterations, depending on your computer specs.).
  Based on my experience, the results don't change after initial 500 iterations. But the traceplots are not as nice as they are with my original setting.

  Note 4: There are more than 70 datasets. So, it would be better to save all the R codes and datasets in the same directory. Some datasets are used by several R codes. 
 

 <Replication Instruction>

  1. First, run "Supplmental_Figure_10.R" and "Figure3_R_code.R". It will take several days to run these codes. Figures 15 and 16 will be produced as well.
     Also, they will produce outputs for "Supplmental_Figure_5_bottom_panel.R" and "Supplmental_Figure_6.R".
 
  2. All other R codes do not require any outputs from the first step. They can be run independently as long as the necessary datasets are in the same directory.  